package com.youkeyi.ddy.cloud.common.api.application.system.dropdown;

import com.youkeyi.ddy.cloud.common.api.application.system.dropdown.dto.SystemDropdownListCloudDto;
import com.youkeyi.ddy.cloud.common.api.application.system.dropdown.param.SystemDropdownListCloudParam;
import io.swagger.annotations.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 系统Dropdown
 *
 * @Author liuxiawang
 * @Date 3/23/22 11:36 PM
 * @Location shenzhen.china
 */
@Api(tags = {"【SYSTEM】dropdown"})
@RestController
@FeignClient(value = "YOUKEYI-DDY-CLOUD-APPLICATION-SYSTEM", fallback = SystemDropdownCloudServiceFallback.class)
@RequestMapping("/system/dropdown")
public interface SystemDropdownCloudService {

    // 查询单一常量
    @ApiOperation(value = "Query System Dropdown One", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.system.dropdown.SystemDropdownCloudService.getOne")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = SystemDropdownListCloudDto.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "dropdownName", paramType = "path", value = "Param of Query System Dropdown Detail", dataType = "String", dataTypeClass = String.class),
    })
    @GetMapping(value = "/get/{dropdownName}")
    public abstract SystemDropdownListCloudDto getOne(@PathVariable("dropdownName") String dropdownName);


    // 查询多个常量
    @ApiOperation(value = "Query System Dropdown More", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.system.dropdown.SystemDropdownCloudService.getMore")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = SystemDropdownListCloudDto.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Query System Dropdown List", dataType = "SystemDropdownListCloudParam", dataTypeClass = SystemDropdownListCloudParam.class),
    })
    @GetMapping
    public abstract SystemDropdownListCloudDto getMore(SystemDropdownListCloudParam param);


    // 查询全部常量
    @ApiOperation(value = "Query System Dropdown All", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.system.dropdown.SystemDropdownCloudService.getAll")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = SystemDropdownListCloudDto.class)
    @GetMapping(value = "/all")
    public abstract SystemDropdownListCloudDto getAll();
}
